package com.itheima01;

import java.sql.*;
import java.util.List;

public class MyConnection1 extends MyConnectionAdapter {
    private Connection conn;
    private List<Connection> conns;

    public MyConnection1(Connection conn, List<Connection> conns) {
        super(conn);
        this.conn = conn;
        this.conns = conns;
    }



    @Override
    public void close() throws SQLException {
        conns.add(conn);

        System.out.println(conns);
    }

}
